import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Index from '@/pages/index' //首页
import banner from '@/pages/banner'
import classifyIndex from '@/pages/classifyIndex'
import hots from '@/pages/hots'
import classify from '@/pages/classify'
import shopping from '@/pages/shopping'
import user from '@/pages/user'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: '首页',
            component: Index,
            children: [{
                    path: "/banner",
                    name: "轮播图管理",
                    component: banner
                },
                {
                    path: "/classifyIndex",
                    name: "首页分类管理",
                    component: classifyIndex
                },
                {
                    path: "/hots",
                    name: "热销商品",
                    component: hots
                },

            ]
        },
        {
            path: '/classify',
            name: '分类管理',
            component: classify
        }, ,
        {
            path: '/shopping',
            name: '购物车管理',
            component: shopping
        }, ,
        {
            path: '/user',
            name: '用户管理',
            component: user
        },
    ]
})